package STUDENT.TRANBANGTUNG.day05_20_2016.bai1;

import java.util.Scanner;

public class Demo {
	public static void main(String[] args) {
		int a = 0;
		Scanner sc;
		double b = 0;
		double sum = 0;
		System.out.println("nhap so luong phan tu trong mang!");
		sc = new Scanner(System.in);
		a = sc.nextInt();
		double[] array = new double[a];
		for (int i = 0; i < a; i++) {
			System.out.println("nhap phan tu thu " + i);
			sc = new Scanner(System.in);
			b = sc.nextDouble();
			array[i] = b;
		}
		for (int i = 0; i < array.length; i++) {
			sum += array[i];
		}
		System.out.println("" + sum);
	}
}
